﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Autodesk.Connectivity.WebServices;

namespace EffectiveFolderPermissions
{
    /// <summary>
    /// A dialog which allows the user to select a Vault folder.
    /// </summary>
    public partial class FolderBrowseDialog : Form
    {
        /// <summary>
        /// Gets the currently selected folder.  The value will be null if no folder is selected.
        /// </summary>
        public Folder SelectedFolder
        {
            get
            {
                return m_folderBrowseControl.SelectedFolder;
            }
        }

        /// <summary>
        /// The constructor.
        /// </summary>
        /// <param name="docSvc">The DocumentService object to use when populating the control.</param>
        public FolderBrowseDialog(DocumentService docSvc)
        {
            InitializeComponent();

            m_folderBrowseControl.DocumentService = docSvc;
            m_folderBrowseControl.InitControl();
        }

        private void m_cancelButton_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }

        private void m_okButton_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
        }

       
    }
}
